package com.zxc;

import com.tianji.api.client.course.CourseClient;
import com.tianji.api.dto.course.CourseFullInfoDTO;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.LearningApplication;
import com.tianji.learning.domin.vo.LearningLessonVO;
import com.tianji.learning.enums.PointsRecordType;
import com.tianji.learning.service.ILearningLessonService;
import com.tianji.learning.service.IPointsRecordService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

@SpringBootTest(classes = LearningApplication.class)
public class test {
    @Autowired
    public ILearningLessonService lessonService;

    @Autowired
    private IPointsRecordService pointsRecordService;
    @Autowired
    private CourseClient courseClient;
    @Test
    public void a(){
        PageQuery pageQuery = new PageQuery();
        pageQuery.setPageNo(1);
        pageQuery.setPageSize(2);
        pageQuery.setIsAsc(true);
        pageQuery.setSortBy("id");
        PageDTO<LearningLessonVO> dto = lessonService.queryMyLessons(pageQuery);
        System.out.println(dto.getList());
    }
    @Test
    public void b(){
        System.out.println(lessonService.queryMyCurrentLesson());
    }

    @Test
    public void c(){
        System.out.println(courseClient.getCourseInfoById(1549025085494521857L, false, false));
    }

    @Test
    public void d(){
        CourseFullInfoDTO info = courseClient.getCourseInfoById(1549025085494521857L, true, true);
        System.out.println(info);
    }

    @Test
    public void e(){
        System.out.println(pointsRecordService.queryMyPointsToday());
    }



}
